package org.bigjava.buff.user.service;

import org.bigjava.buff.common.util.Page;
import org.bigjava.buff.goods.bean.ExteriorAndPrice;
import org.bigjava.buff.user.bean.Deal;
import org.bigjava.buff.user.bean.User;

import java.util.List;

public interface DealService {

    //发起交易
    public Deal createDeal(ExteriorAndPrice ep, User user, Integer dealType, Double price);

    //查询用户正在出售的物品
    public List getGoodsInSell(Integer userId,Integer dealType);

    //通过物品id来获得物品的交易信息
    public List getGoodsDealByGoodsId(Integer goodsId,Integer dealType);

    //批量创建交易
    public List<Deal> batchDeal(List<Deal> deals);

    //获取最新的交易集合
    public List<Deal> getNewDealList(Integer num);

    //批量下架饰品
    public void batchSoldOutGoods(Integer[] ids);

    //根据订单号获取订单
    public Deal getDealByOrderNum(String orderNum);

    //获取在交易中的物品
    public Page getDeal(Integer dealType, Page page);

    //关闭交易
    public int closeDeal(Integer did);

    //获取最新交易
    public List getNewDeal();
}
